package com.lineage.data.item_etcitem.event;

import com.lineage.data.executor.ItemExecutor;
import com.lineage.server.model.Instance.L1ItemInstance;
import com.lineage.server.model.Instance.L1PcInstance;
import com.lineage.server.model.skill.L1BuffUtil;
import com.lineage.server.serverpackets.S_ServerMessage;
import com.lineage.server.serverpackets.S_SkillSound;
import com.lineage.server.serverpackets.ServerBasePacket;

public class SExp250 extends ItemExecutor {
  public static ItemExecutor get() {
    return new SExp250();
  }
  
  public void execute(int[] data, L1PcInstance pc, L1ItemInstance item) {
    if (item == null)
      return; 
    if (pc == null)
      return; 
    if (L1BuffUtil.cancelExpSkill_2(pc)) {
      int time = 600;
      if (pc.getInventory().removeItem(item, 1L) == 1L) {
        pc.setSkillEffect(5004, 600000);
        pc.sendPackets((ServerBasePacket)new S_ServerMessage("第二段经验值提升250%(600秒)"));
        pc.sendPackets((ServerBasePacket)new S_SkillSound(pc.getId(), 750));
      } 
    } 
  }
}
